1. Field of the Invention
The present invention relates to a communication method and an apparatus for transmitting to an upper layer of a node only those packets that satisfy a predetermined condition from among packets received by a lower layer of the node in accordance with a communication protocol having a hierarchy structure, such as IEEE 1394.
2. Description of the Related Art
IEEE 1394-1995 and IEEE 1394a-2000 are standards of a high-speed serial bus and support two types of transfers including an asynchronous transfer and an isochronous transfer.
When the asynchronous transfer is performed between nodes connected to a bus, a read request packet is sent from a read request node and a read response packet is sent from a read response node. In header portions of both of the read request packet and the read response packet, destination IDs (destination_ID) indicating destinations of the packets are stored.
In link layers of the respective nodes connected to the bus, when a packet is present on the bus, the packet is received via a physical layer interface, and a judgment or determination is made whether or not a destination ID stored in a header portion of the packet coincides with a node ID identifying each node.
When both IDs coincide with each other, information included in the packet is transmitted to a transaction layer that is an upper layer of the node.
However, there are two problems as described below in the conventional art. A first, description will be made of a first problem. In IEEE 1394, when a connection state of nodes changes due to insertion/withdrawal of a cable, bus reset occurs, and a node ID of each of the nodes may change. A new node ID of each node is judged or determined in the process of tree identification and self identification which will follow after the bus reset caused by the insertion/withdrawal of the cable. Moreover, all of the nodes store unduplicated data of 64 bits, which is called an EUI-64 (an extended unique identifier), in a specified address region in a configuration ROM, in order to specify the manufacturer of an apparatus and the like.
In an operation system supporting the IEEE 1394, after the bus reset, the tree identification and the self identification are completed, each node on the bus reads the EUI-64 of all nodes except for its own in order to identify the other nodes. A read transaction of a specified node to a specified address is started by sending a read request packet to a header portion of a packet, the read request packet storing a destination ID for specifying a node and a destination offset for specifying an address. A node that received the read request packet stores data of a requested address in a read response packet and sends the read response packet back. By the sending of the read request packet and the sending back of the read response packet, the read transaction is finished. After the bus reset, the tree identification and the self identification are completed, each node sends the read transactions of “the number of all nodes—1”.
For example, when a first node, a second node and a third node exist, read request packets are sent as follows: (1) a read request packet, in which the second node is a destination ID, and a read request packet, in which the third node is the destination ID, are sent from the first node; (2) the read request packet, in which the third node is the destination ID, and a read request packet, in which the first node is the destination ID, are sent from the second node; and (3) the read request packet, in which the first node is the destination ID, and the read request packet, in which the second node is the destination ID, are sent from the third node. Specifically, six read request packets are sent in total.
In the case where data is exchanged between the specified two nodes before the bus reset by use of an upper protocol of the IEEE 1394 (e.g.: AV/C (Audio-Video/Control) SBP (Serial Bus Protocol)—2, DPP (Direct Print Protocol)), there is a possibility that the node ID will change after the bus reset. Thus, an EUI-64 value of each node is read after the bus reset, and a counterpart node with which the data has been exchanged before the bus reset is searched. Also in this case, an EUI-64 value of the counterpart node with which the data is exchanged is previously stored, and the read transaction, in which the EUI-64 values are the object to be read, is repeated until a node having an EUI-64 value equivalent to the foregoing EUI-64 value is found. When the node having the relevant EUI-64 value is found, a continuation of the transaction interrupted by the bus reset can be restarted.
When 63 nodes exist on the bus, and the read transaction designating the address, in which the EUI-64 is stored, is performed for all the nodes while each node changes its node ID from “0” to “the number of all nodes—1” after the bus reset, the read transaction will be performed a total of 62×63 times.
As described above, after the bus reset, the bus is likely to be congested by the read transaction of the EUI-64. Moreover, in the case where a node exists which is likely to be hung up when receiving read transactions from a number of nodes, there is a substantial possibility that a hang up will occur in the EUI-64 read transaction after the bus reset.
Next, description will be made of a second problem. As described above, the conventional link layer compares the self node ID to the destination ID included in the header of the packet on the bus and informs the transaction layer of only the packets in which both the IDs coincide with each other. That is, a node having the link layer receives the packet. Accordingly, when an arbitrary node a, for example, wants to know the state of a specified node b, a read request packet addressed to the node b from the node a must arrive at the node b and a read response packet addressed to the node a from the node b must arrive at the node a. Even if a node other than the node a (for example, node c) sends a read request packet to the node b and a read response packet addressed to the node c is sent from the node b to the bus, a link layer of the node a does not inform the read response packet addressed to the node c of an upper layer of the node a. Therefore, even if a read response packet having necessary information for the node a arrives at the link layer of the node a, the read response packet is not transmitted to the upper layer of the node a unless the packet is addressed to the node a.
As a result, when the node a cannot log into the node b because, for example, the number of nodes capable of establishing connection states with the node b in an upper application is determined and the maximum number of nodes capable of establishing the connection states therewith have already logged into the node b, the node a has to repeat the read transaction in order to check for the state of the node b until any one of the nodes already establishing the connection states with the node b cancel their connection states.